﻿using System.Web.Mvc;

namespace Superstore.Vender.App_Code
{
    public static class AppHelper
    {
        /// 截取字符串+“…”
        public static string ASubString(this HtmlHelper helper, string input, int Limit)
        {
            if (input.Length > Limit)
            {
                return input.Substring(0, Limit) + "…";
            }
            else
            {
                return input;
            }  
        }
        /// 截取字符串
        public static string SubString(this HtmlHelper helper, string input, int Limit)
        {
            if (input.Length > Limit)
            {
                return input.Substring(0, Limit);
            }
            else
            {
                return input;
            }
        }
    }
}